/**
 * @(#)SysMenu.java	07/05/2013
 *
 * Copyright (c) 2013 S9,Inc.All rights reserved.
 * Created by 2013-07-05 
 */
package cn.jdy.authority.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * 系统菜单实体类 菜单相关操作的一些基本信息，对应数据库中的S9_SYS_MENU表。 liGan 2013-7-04
 */
@Entity
public class SysMenu implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	@Column(length = 32)
	private String id; // 本实体记录的唯一标识
	private String pid; // 直接上级菜单的菜单标识
	private String menuname; // 菜单名称
	@Transient
	private String pmenuName; // 直接上级菜单的菜单名称
	private int sort; // 在同级中的排列顺序的序号，用自然数标识，如，1、2、3
	private String menuimg; // 菜单图标
	private String url; // 菜单路径
	private String isactive; // 是否可用标识 0 无效 1 有效
	private String remark; // 菜单的备注

	@Transient
	private List<SysMenu> children; // 二级菜单

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getMenuname() {
		return menuname;
	}

	public void setMenuname(String menuname) {
		this.menuname = menuname;
	}

	public String getPmenuName() {
		return pmenuName;
	}

	public void setPmenuName(String pmenuName) {
		this.pmenuName = pmenuName;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public String getMenuimg() {
		return menuimg;
	}

	public void setMenuimg(String menuimg) {
		this.menuimg = menuimg;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIsactive() {
		return isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<SysMenu> getChildren() {
		return children;
	}

	public void setChildren(List<SysMenu> children) {
		this.children = children;
	}

}
